package com.dayu.gulimall.order.feign;

import com.dayu.common.utils.R;
import com.dayu.gulimall.order.vo.OrderLockVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author dayu
 * @version 1.0
 * @email dayu007@foxmail.com
 * @date 2021/4/27 7:44
 * @description
 */
@FeignClient("gulimall-ware")
public interface WareFeignService {

    @PostMapping("/ware/waresku/hasstock")
    R hasStock(@RequestBody List<Long> skuIds);

    @GetMapping("/ware/wareinfo/fair")
     R getFair(@RequestParam("addrId")Long addrId);



    @PostMapping("/ware/waresku/lock/order")
    R lockOrderStock(@RequestBody OrderLockVo vo);
}
